package com.tea.zxql.utils;

import cn.dev33.satoken.secure.BCrypt;

/**
 * @ClassDescription:
 * @ClassName: MyEncryption
 * @JdkVersion: 17
 * @Author: HYC
 * @Created: 2025/7/31 14:47
 * @Version 1.0
 */
public class MyEncryption {


    // 加密
    public static String encrypt(String str) {
        return BCrypt.hashpw(str, BCrypt.gensalt());
    }

    // 校验
    public static boolean checkPwd(String str, String hash) {
        return BCrypt.checkpw(str, hash);
    }


}
